package com.example.board.controller;

import com.example.board.common.R;
import com.example.board.service.PublicFilterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/")
@Api(tags = "通用接口",value = "通用接口")
@RequiredArgsConstructor
public class PublicFilterController {

    private final PublicFilterService publicFilterService;

    @ApiOperation("业务员筛选器")
    @PostMapping(value = "/public/filter-sales_man")
    public R getSalesMan(){
        return R.ok(publicFilterService.getSalesMan());
    }

    @ApiOperation("区域筛选器")
    @PostMapping(value = "/public/filter-area")
    public R getRegionalFiltering(){
        return R.ok(publicFilterService.getRegionalFiltering());
    }


}
